//
//  ViewController.m
//  UIGestureTest
//
//  Created by YaoZhaofeng on 2018/4/5.
//  Copyright © 2018年 YaoZhaofeng. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    
}

- (void)tapTest {
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
    tap1.numberOfTapsRequired = 1;
    [self.view addGestureRecognizer:tap1];
    
    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
    tap2.numberOfTapsRequired = 2;
    [self.view addGestureRecognizer:tap2];
    
    UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
    tap3.numberOfTapsRequired = 3;
    [self.view addGestureRecognizer:tap3];
    
    UITapGestureRecognizer *tap4 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
    tap4.numberOfTapsRequired = 4;
    [self.view addGestureRecognizer:tap4];
}

- (void)tap:(UITapGestureRecognizer *)sender {
    NSLog(@"touch time::%lu", (unsigned long)sender.numberOfTapsRequired);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
